<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
import config from './config'
import http from '@/http'
import wxChatJumpAppAndShare from '@/components/wechat'
export default {
  data() {
    return {
      
    }
  },
  mounted() {
    this.shareInit();
  },
  methods:  {
      shareInit() {
        let shareObj = localStorage.getItem('shareObj') ? JSON.parse(localStorage.getItem('shareObj')) : '';
        if (shareObj) {
          wxChatJumpAppAndShare(8, {shareTitle: shareObj.shareTitle, shareDesc: shareObj.shareSummary, shareLink: `${window.location.origin}${window.location.pathname}`, shareImgUrl: shareObj.shareImgUrl  })
        } else {
          setTimeout(()=> {
            this.shareInit();
          }, 2000)
        }
      }
  }
}
</script>

<style lang="less">
*{
  margin: 0;
  padding: 0;
}
body{
  background: linear-gradient(to bottom,  rgba(229,242,210,1) 0%,rgba(174,213,211,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  min-height: 100vh;
  max-width: 750px;
  margin: auto !important;
}
</style>
